﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace St0rm.IRCPro.Common
{
    /// <summary>
    /// Contains encodings used by IRC Pro client
    /// </summary>
    public class IRCEncodings
    {
        static IRCEncoding _utf8 = new IRCUTF8Encoding();
        static IRCEncoding _ascii = new IRCASCIIEncoding();
        private IRCEncodings()
        {
        }
        /// <summary>
        /// The IRC Encoding for UTF8
        /// </summary>
        public static IRCEncoding UTF8
        {
            get
            {
                return _utf8;
            }
        }
        /// <summary>
        /// The IRC Encoding for ASCII
        /// </summary>
        public static IRCEncoding ASCII
        {
            get
            {
                return _ascii;
            }
        }
    }

    /// <summary>
    /// Represents an encoding used by the IRC Pro Client
    /// </summary>
    public interface IRCEncoding
    {
        
    }

    /// <summary>
    /// IRC UTF8 Encoding (UTF8 Without Preamble)
    /// </summary>
     class IRCUTF8Encoding : System.Text.UTF8Encoding, IRCEncoding
    {
        /// <summary>
        /// </summary>
        /// <returns></returns>
        public override byte[] GetPreamble()
        {
            return new byte[0];
        }
    }

     class IRCASCIIEncoding : System.Text.ASCIIEncoding, IRCEncoding
    {
    }
}
